home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / HYP / C-D / Dial Button.cpt / Dial Button / card_3021.txt < prev    next >
Text File  |  1989-02-26  |  2KB  |  86 lines

  1. -- card: 3021 from stack: in
  2. -- bmap block id: 2239
  3. -- flags: 0000
  4. -- background id: 2598
  5. -- name: 
  6.  
  7.  
  8. -- part 3 (button)
  9. -- low flags: 00
  10. -- high flags: 0000
  11. -- rect: left=115 top=80 right=110 bottom=145
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 15125 / 15125
  14. -- text alignment: 1
  15. -- font id: 0
  16. -- text size: 12
  17. -- style flags: 0
  18. -- line height: 16
  19. -- part name: C
  20. ----- HyperTalk script -----
  21. on mouseUp
  22.   put "28589,30793,29168,25638,30012,8453,17584,31008,2629," into clock
  23.   put "15125,4206,24477" after clock
  24.   put 30 into del
  25.   put del/2 into halfdel
  26.   put the rect of me into r1
  27.   put the clickloc into mc
  28.   put item 1 of mc into xmc
  29.   put item 2 of mc into ymc
  30.   put item 1 of r1 into x0
  31.   put item 2 of r1 into y0
  32.   put x0+halfdel into xc
  33.   put y0+halfdel into yc
  34.   put xmc-xc into dx
  35.   put yc-ymc  into dy
  36.   put dy/dx into t
  37.   put atan(t)*57.2958 into d
  38.   if dy<0 and dx>0 then put 360+d into d
  39.   if dx<0 then put 180+d into d
  40.   put (450-d) mod 360 into d
  41.   put trunc((d+15)/30)  into h
  42.   if h<1 or h>12 then put 12 into h
  43.   put item h of clock into hi
  44.   set the icon of me to hi
  45.   set the numberformat to "0.##"
  46.   put d into card field degrees
  47.   put h into card field hours
  48. end mouseUp
  49.  
  50.  
  51.  
  52. -- part 4 (field)
  53. -- low flags: 00
  54. -- high flags: 0004
  55. -- rect: left=83 top=124 right=142 bottom=139
  56. -- title width / last selected line: 0
  57. -- icon id / first selected line: 0 / 0
  58. -- text alignment: 65535
  59. -- font id: 3
  60. -- text size: 12
  61. -- style flags: 0
  62. -- line height: 16
  63. -- part name: degrees
  64.  
  65.  
  66. -- part 5 (field)
  67. -- low flags: 00
  68. -- high flags: 0004
  69. -- rect: left=83 top=150 right=168 bottom=140
  70. -- title width / last selected line: 0
  71. -- icon id / first selected line: 0 / 0
  72. -- text alignment: 65535
  73. -- font id: 3
  74. -- text size: 12
  75. -- style flags: 0
  76. -- line height: 16
  77. -- part name: hours
  78.  
  79.  
  80. -- part contents for card part 4
  81. ----- text -----
  82. 288.43
  83.  
  84. -- part contents for card part 5
  85. ----- text -----
  86. 10